#ifndef OBJECT_DIALOG_H
#define OBJECT_DIALOG_H

#include <QDialog>
#include <QtGui>
#include "objectTreeItem.h"
#include "src/object.h"
#include "defines/primitive.h"

class ObjectDialog : public QDialog{
    Q_OBJECT

    public:
        ObjectDialog(int, QWidget * = 0);
        ObjectDialog(TreeItem *, QWidget * = 0);
        ~ObjectDialog();

    signals:
        void done();
        void done(Object *, unsigned int);

    protected:
        Object *object;
        TreeItem *item;
        int id, colorR, colorG, colorB, colorAlpha;
        bool colorChanged;

        QPushButton *colorPushButton;

        virtual void createLayout(){};
        QVBoxLayout *createColorButtonLayout();
        void setButtonColor();

    protected slots:
        virtual void acceptAndCreate();
        void changeColor();
};

#endif
